﻿using PDFDesign.Model;
using PDFDesign.ViewModel;
using System.Windows;

namespace PDFDesign
{
    /// <summary>
    /// NewDesignWindow.xaml 的交互逻辑
    /// </summary>
    public partial class NewDesignWindow
    {
        private readonly NewDesignViewModel viewModel;

        public NewDesignWindow()
        {
            InitializeComponent();
            viewModel = new NewDesignViewModel(this);
            DataContext = viewModel;
        }

        private void TreeView_SelectedItemChanged(object sender, RoutedPropertyChangedEventArgs<object> e) => viewModel.CurrentNode = (TreeNodeModel)e.NewValue;
    }
}
